package com.lmk.t3;

import java.util.Arrays;

public class CatText {
    public static void main(String[] args) {
        Cat tom=new Cat();
        tom.setColor("蓝色");
        tom.setName("汤姆");
        tom.setAge(2);

        Cat xh=new Cat();
        tom.setColor("黄色");
        tom.setName("小花");
        tom.setAge(5);

        Cat jf=new Cat();
        tom.setColor("绿色");
        tom.setName("加菲");
        tom.setAge(3);



        Cat[] cs={tom,xh,jf};


        System.out.println(Arrays.toString(cs));
        Arrays.sort(cs);
        System.out.println(Arrays.toString(cs)
        );

    }
}
